﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="../Scripts/jquery.js"></script>
<script type="text/javascript" src="../Scripts/Verify.js"></script>
<link href="../Styles/Public.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>验证不等于某值</h1>
<h2>概述</h2>
<div class="desc">
  <p>要求控件的值不得等于某些值，常见应用场景如选择菜单，不得选择某几项。</p>
  <p>设置控件的参数<strong> novalue</strong> ,如novalue="1|2"，即不得等于1和2。</p>
  <p>&nbsp;</p>
</div>
<h2>示例</h2>
<h3>1、验证不等于某值</h3>
<div class="desc">
  <fieldset>
    <legend>选择框的验证</legend>
    <pre>&lt;form onsubmit=&quot;alert('验证成功');return false;&quot;&gt;<br />      &lt;p&gt;学历：<br />      &lt;select name=&quot;select&quot; id=&quot;select&quot; <strong>novalue=&quot;|1|2&quot;</strong> alt=&quot;请选择专科或以上学历&quot;&gt;<br />        &lt;option value=&quot;&quot;&gt;--请选择--&lt;/option&gt;<br />        &lt;option value=&quot;5&quot;&gt;硕士&lt;/option&gt;<br />        &lt;option value=&quot;4&quot;&gt;本科&lt;/option&gt;<br />        &lt;option value=&quot;3&quot;&gt;专科&lt;/option&gt;<br />        &lt;option value=&quot;2&quot;&gt;中学&lt;/option&gt;<br />        &lt;option value=&quot;1&quot;&gt;小学&lt;/option&gt;<br />      &lt;/select&gt;<br />    &lt;/p&gt;<br />      &lt;p&gt;<br />        &lt;input type=&quot;submit&quot; name=&quot;button&quot; class=&quot;button&quot; value=&quot;验证表单&quot; verify=&quot;true&quot;/&gt;<br />      &lt;/p&gt;<br />    &lt;/form&gt;</pre>
    <form onsubmit="alert('验证成功');return false;">
      <p>学历：
      <select name="select" id="select" novalue="|1|2" alt="请选择专科或以上学历">
        <option value="">--请选择--</option>
        <option value="5">硕士</option>
        <option value="4">本科</option>
        <option value="3">专科</option>
        <option value="2">中学</option>
        <option value="1">小学</option>
      </select>
    </p>
      <p>
        <input type="submit" name="button" class="button" value="验证表单" verify="true"/>
      </p>
    </form>
  </fieldset>
  
</div>

</body>
</html>
